<% if current_user %>
<h2>我的专辑</h2>
<div id="users-albums">
</div>
<h2>其他专辑</h2>
<div id="other-albums">
</div>
<script type="text/javascript">
<%= remote_function :url => "/albums/list/1?uid=#{current_user.id}",
    :method => "get", :update => "users-albums" %>
<%= remote_function :url => "/albums/list/2?uid=#{current_user.id}",
    :method => "get", :update => "other-albums" %>
</script>
<% else %>
<h2>所有专辑</h2>
<div id="album-list">
</div>
<script type="text/javascript">
<%= remote_function :url => "/albums/list/0",
    :method => "get", :update => "album-list" %>
</script>
<% end %>


<br />

<% if current_user %>
<b><%= link_to '创建新专辑', new_album_path %></b>
<% end %>
